package app.r_teenus.backend.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "CUSTOMER")
public class Customer implements Serializable {

	private static final long serialVersionUID = 664993679946963719L;
	private Integer id = null;
	private Integer subject;
	private Integer subject_type;
	private Person person;
	private Enterprise enterprise;

	/**
	 * Gets id (primary key).
	 */
	@Id
	@Column(name = "customer")
	@SequenceGenerator(name = "customer_id", sequenceName = "customer_id", allocationSize = 1)
	@GeneratedValue(generator = "customer_id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "SUBJECT_TYPE_FK")
	public Integer getSubject_type() {
		return subject_type;
	}

	public void setSubject_type(Integer subject_type) {
		this.subject_type = subject_type;
	}

	@Column(name = "SUBJECT_FK")
	public Integer getSubject() {
		return subject;
	}

	public void setSubject(Integer subject) {
		this.subject = subject;
	}

	@Transient
	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	@Transient
	public Enterprise getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(Enterprise enterprise) {
		this.enterprise = enterprise;
	}

}
